import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
  routes: [
    // 登录
    {
      nam: 'login',
      path: '/login',
      component: resolve => require(['@/page/login.vue'], resolve),
    },
    // 重置密码
    {
      nam: 'resetPwd',
      path: '/resetPwd',
      component: resolve => require(['@/page/resetPwd.vue'], resolve),
    },
    {
      path: '/',
      component: resolve => require(['@/components/common/Home.vue'], resolve),
      children: [{
          path: '/CollectionChannelManagement',
          component: resolve => require(['@/page/collection-channel-management/CollectionChannelManagement.vue'], resolve) // 路由管理 => 代收通道管理
        },
        {
          path: '/AccessRouteManagement',
          component: resolve => require(['@/page/collection-channel-management/AccessRouteManagement.vue'], resolve) // 路由管理 => 通道路由规则管理
        },
        {
          path: '/OperationLog',
          component: resolve => require(['@/page/log-management/OperationLog.vue'], resolve) // 日志管理 => 操作日志
        }
      ]
    }
  ]
})
